package com.wodsy.phoenix.dataobject.memberc.model;

import java.util.Date;
import javax.persistence.*;

import com.wodsy.phoenix.dataobject.base.PhoenixObject;
import org.hibernate.annotations.GenericGenerator;

/**
 * TbReceiptAddress entity. @author MyEclipse Persistence Tools
 */
@Entity(name = "membercReceiptAddress")
@Table(name = "tb_receipt_address", catalog = "memberc")
public class ReceiptAddress extends PhoenixObject {

	// Fields

	private Integer id;
	private String receiptName;
	private String cellphone;
	private String telephone;
	private AreaDict area1;
	private AreaDict area2;
	private AreaDict area3;
	private AreaDict area4;
	private String addressDetail;
	private Boolean defaulted;
	private String zipCode;
	private Date createTime;
	private Date updateTime;

	// Constructors

	/** default constructor */
	public ReceiptAddress() {
	}


	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "receipt_name", nullable = false, length = 20)
	public String getReceiptName() {
		return this.receiptName;
	}

	public void setReceiptName(String receiptName) {
		this.receiptName = receiptName;
	}

	@Column(name = "cellphone", nullable = false, length = 15)
	public String getCellphone() {
		return this.cellphone;
	}

	public void setCellphone(String cellphone) {
		this.cellphone = cellphone;
	}

	@Column(name = "telephone", length = 15)
	public String getTelephone() {
		return this.telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}


    @OneToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "area_id1")
	public AreaDict getArea1() {
		return this.area1;
	}

	public void setArea1(AreaDict area1) {
		this.area1 = area1;
	}

    @OneToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "area_id2")
	public AreaDict getArea2() {
		return this.area2;
	}

	public void setArea2(AreaDict area2) {
		this.area2 = area2;
	}

    @OneToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "area_id3")
	public AreaDict getArea3() {
		return this.area3;
	}

	public void setArea3(AreaDict area3) {
		this.area3 = area3;
	}

    @OneToOne(fetch = FetchType.EAGER)
    @JoinColumn(name = "area_id4")
	public AreaDict getArea4() {
		return this.area4;
	}

	public void setArea4(AreaDict area4) {
		this.area4 = area4;
	}


	@Column(name = "address_detail", nullable = false, length = 150)
	public String getAddressDetail() {
		return this.addressDetail;
	}

	public void setAddressDetail(String addressDetail) {
		this.addressDetail = addressDetail;
	}

	@Column(name = "defaulted", nullable = false)
	public Boolean getDefaulted() {
		return this.defaulted;
	}

	public void setDefaulted(Boolean defaulted) {
		this.defaulted = defaulted;
	}

	@Column(name = "zip_code")
	public String getZipCode() {
		return this.zipCode;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	@Column(name = "create_time", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "update_time", length = 19)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

}